<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorator="layout/base">
<head>
	<title>客户提醒管理</title>
	<script type="text/javascript" th:src="@{/assets/js/plugins/pickers/daterangepicker.js}"></script>
</head>

<body>

	<!-- Page header -->
	<div class="page-header" layout:fragment="page-header">
		<div class="page-header-content">
			<div class="page-title">
				<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold" th:text="#{web.name}">管理系统</span> - 客户管理</h4>
			</div>
		</div>
	</div>
	<!-- /page header -->


	<!-- Main content -->
	<div class="content-wrapper" layout:fragment="content">

		<!-- Table -->
		<div class="panel panel-flat min-panel">
			<div class="panel-heading">
				<h5 class="panel-title text-primary"><i class="icon-twitter" />客户列表</h5>
        	</div>

        	<div class="panel-body">
        			<form id="query" action="#" class="form-horizontal">
						<div class="row">
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-3 control-label">名称:</label>
									<div class="col-lg-9">
										<input type="text" name="name" class="form-control" placeholder="名称 模糊查询" />
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-3 control-label">电话号码:</label>
									<div class="col-lg-9">
										<input type="text" name="phoneNo" class="form-control" placeholder="电话号码 模糊查询" />
									</div>
								</div>
							</div>

							<div class="col-md-3 ">
								<div class="form-group">
									<input type="hidden" name="view" th:value="${view}"></input>
									<input type="hidden" name="type" th:value="${type}"></input>
									<button type="button" id="submit" class="btn btn-primary">查询 <i class="icon-search position-right"></i></button>
									<button type="button" class="btn btn-primary btn-add" data-toggle="modal" data-target="#edit_dialog">新增<i class="icon-user-plus position-right"></i></button>
								</div>
							</div>
						</div>
        			</form>
				<table class="table datatable-basic table-striped table-hover">
					<thead>
						<tr class="bg-primary">
							<th>客户名称</th>
							<th>会员星级</th>
							<th>所属渠道商</th>
							<th>电话号码</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody class="border-dashed">
						
					</tbody>
				</table>
			</div>
		</div>
		
		<div id="sms_dialog" class="modal fade in">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal">×</button>
						<h5 class="modal-title text-primary">短信</h5>
					</div>
					
					<form id="saveSms" action="#">
					<div class="modal-body">
							<div class="form-group">
								<label>发送给<span class="text-danger">*</span></label>	
								<select name="receiver" class="select form-control input-xs">
									<option value="-1" >选择接收方</option>
									<option value ="0">客户</option>
									<option value ="1">渠道商</option>
								</select>
							</div>
							
							<div class="form-group">
								<label>是否立即发送<span class="text-danger">*</span></label>	
								<select name="sendNow" onchange="selectedSendNow(this)" class="select form-control input-xs">
									<option value="-1" >选择是否立即发送</option>
									<option value ="0">是</option>
									<option value ="1">否</option>
								</select>	
							</div>
							
							<div class="form-group">
								<label>短信发送模板<span class="text-danger">*</span></label>	
								<select name="smsTemplet" onchange="selectedSmsTemplet(this)" class="select form-control input-xs">
									<option value="-1" >选择短信发送模板</option>
									<option value ="0">拆线提醒</option>
									<option value ="1">复诊提醒</option>
									<option value ="2">操作提醒</option>
									<option value ="3">生日提醒</option>
									<option value ="4">自定义提醒</option>
								</select>	
							</div>
							
							<div id="sendTimeDiv" class="form-group" style="display:none">
								<label>发送日期<span class="text-danger">*</span></label>
								<input type="text" id="sendTime" name="sendTime" class="form-control" placeholder="发送时间" />
							</div>
							
							<div id="hourDiv" class="form-group" style="display:none">
								<label>发送时间<span class="text-danger">*</span></label>	
								<select name="hour" class="select form-control input-xs">
								  <option value ="1">1点</option>
								  <option value ="2">2点</option>
								  <option value="3">3点</option>
								  <option value="4">4点</option>
								  <option value="5">5点</option>
								  <option value="6">6点</option>
								  <option value="7">7点</option>
								  <option value="8">8点</option>
								  <option value="9">9点</option>
								  <option value="10">10点</option>
								  <option value="11">11点</option>
								  <option value="12">12点</option>
								  <option value="13">13点</option>
								  <option value="14">14点</option>
								  <option value="15">15点</option>
								  <option value="16">16点</option>
								  <option value="17">17点</option>
								  <option value="18">18点</option>
								  <option value="19">19点</option>
								  <option value="20">20点</option>
								  <option value="21">21点</option>
								  <option value="22">22点</option>
								  <option value="23">23点</option>
								  <option value="24">24点</option>
								</select>
							</div>
							
							<div class="form-group">
								<label>短信内容<span class="text-danger">*</span></label>	
								<textarea id="content" name="content" rows="8" cols="20" placeholder="短信内容" class="form-control" maxlength="300" required="true"></textarea>
							</div>
							
							<input name="customerId" type="hidden" />
						</div>
						
							
							<div class="modal-footer">
									<button type="button" class="btn btn-link" data-dismiss="modal">关闭</button>
									<button type="button" id="submitSms" class="btn btn-primary" >发送</button>
							</div>
					</form>

				</div>
			</div>
		</div>
		
		<script type="text/templete" id="btnGroup">
			<div class="btn-group" data-toggle="buttons">
				<button type="button" class="btn btn-link text-primary btn-sms" title="提醒" data-toggle="modal" data-target="#sms_dialog">提醒</button>
			</div>
		</script>
		
		<!-- /table -->
		<script type="text/javascript" th:src="@{/oss/js/remind.js}"></script>
	</div>
	<!-- /main content -->

</body>
</html>
